package com.ydy.mapper;

import com.ydy.my.mapper.MyMapper;
import com.ydy.pojo.Items;
import com.ydy.pojo.vo.SearchItemsVO;
import com.ydy.pojo.vo.ShopCartVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItemsMapper extends MyMapper<Items> {

    List<SearchItemsVO> searchItemsByKeyWords(@Param("paramsMap") Map<String, Object> map);

    List<SearchItemsVO> searchItemsByCatId(@Param("paramsMap") Map<String, Object> map);

    List<ShopCartVO> queryItemsBySpecIds(@Param("paramsList") List specIdsList);

    int decreaseItemSpecStock(@Param("specId") String specId,
                              @Param("buyCounts") int buyCounts);
}